﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using WarOfDev.Web.ViewModels;
using WarOfDev.EF;

namespace WarOfDev.Web.Models.MappingToViewModel
{
    public static class DeveloperMapping
    {
        public static DeveloperViewModel ToViewModel(this Developer developer)
        {
            DeveloperViewModel vm = new DeveloperViewModel();
            vm.Id = developer.Id;
            vm.DomainAccount = developer.DomainAccount;
            vm.NickName = developer.NickName;
            vm.IsLocked = developer.IsLocked;
            vm.TrueName = developer.TrueName;
            vm.ModifiedBy = developer.ModifiedBy;
            vm.ModifiedOn = developer.ModifiedOn;
            vm.CreatedBy = developer.CreatedBy;
            vm.CreatedOn = developer.CreatedOn;
            vm.ExperienceValue = developer.ExperienceValue;
            vm.GameLevel = developer.GameLevel;

            return vm;
        }
    }
}